/*********************************************************************************
  *Copyright(C),2015-2020, 
  *TUYA 
  *www.tuya.comm
  *
  * File Description：
  * 1. DP point setting and get function definition, please refer to the code comment in the .c file for details.
**********************************************************************************/

#ifndef _TUYA_IPC_DP_HANDLER_H
#define _TUYA_IPC_DP_HANDLER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include "tuya_cloud_types.h"
#include "tuya_ipc_ptz.h"
#include "tuya_ipc_stream_storage.h"
#include "tuya_com_dp_id_info.h"
#include "InCommon.h"
#include "SdkOsd.h"
#include "SdkSpk.h"
#include "SdkNightMonitor.h"
#include "SdkHardware.h"
#include "tuya_cloud_com_defs.h"

#ifdef TUYA_DP_SLEEP_MODE
VOID IPC_APP_set_sleep_mode(BOOL_T sleep_mode);
BOOL_T IPC_APP_get_sleep_mode(VOID);
#endif

#ifdef TUYA_DP_LIGHT
VOID IPC_APP_set_light_onoff(BOOL_T light_on_off);
BOOL_T IPC_APP_get_light_onoff(VOID);
#endif

#ifdef TUYA_DP_FLIP
VOID IPC_APP_set_flip_onoff(BOOL_T flip);
BOOL_T IPC_APP_get_flip_onoff(VOID);
#endif

#ifdef TUYA_DP_WATERMARK
VOID IPC_APP_set_watermark_onoff(BOOL_T watermark_on_off);
BOOL_T IPC_APP_get_watermark_onoff(VOID);
#endif

#ifdef TUYA_DP_NIGHT_MODE
VOID IPC_APP_set_night_mode(PCHAR_T p_night_mode);
CHAR_T *IPC_APP_get_night_mode(VOID);
#endif

#ifdef TUYA_DP_ALARM_FUNCTION
VOID IPC_APP_set_alarm_function_onoff(BOOL_T alarm_on_off);
BOOL_T IPC_APP_get_alarm_function_onoff(VOID);
#endif

#ifdef TUYA_DP_ALARM_SENSITIVITY
VOID IPC_APP_set_alarm_sensitivity(PCHAR_T p_sensitivity);
CHAR_T *IPC_APP_get_alarm_sensitivity(VOID);
#endif

#ifdef TUYA_DP_MOTION_TIMER_SWITCH
VOID IPC_APP_set_motion_timer_switch(BOOL_T val);
BOOL_T IPC_APP_get_motion_timer_switch(VOID);
#endif

#ifdef TUYA_DP_MOTION_TIMER_SETTING
VOID IPC_APP_set_motion_timer_setting(PCHAR_T time);
VOID IPC_APP_get_motion_timer_setting(PCHAR_T time);
#endif

#ifdef TUYA_DP_ALARM_ZONE_ENABLE
VOID IPC_APP_set_alarm_zone_onoff(BOOL_T alarm_zone_on_off);
BOOL_T IPC_APP_get_alarm_zone_onoff(VOID);
#endif

#ifdef TUYA_DP_ALARM_ZONE_DRAW
VOID IPC_APP_set_alarm_zone_draw(PCHAR_T p_alarm_zone);
char * IPC_APP_get_alarm_zone_draw(VOID);
#endif

#ifdef TUYA_DP_ALARM_INTERVAL
VOID IPC_APP_set_alarm_interval(PCHAR_T p_interval);
CHAR_T *IPC_APP_get_alarm_interval(VOID);
#endif

#ifdef TUYA_DP_SD_STATUS_ONLY_GET
INT_T IPC_APP_get_sd_status(VOID);
#endif

#ifdef TUYA_DP_SD_STORAGE_ONLY_GET
VOID IPC_APP_get_sd_storage(UINT_T *p_total, UINT_T *p_used, UINT_T *p_empty);
#endif

#ifdef TUYA_DP_SD_RECORD_ENABLE
VOID IPC_APP_set_sd_record_onoff(BOOL_T sd_record_on_off);
BOOL_T IPC_APP_get_sd_record_onoff(VOID);
#endif

#ifdef TUYA_DP_SD_RECORD_MODE
VOID IPC_APP_set_sd_record_mode(UINT_T sd_record_mode);
UINT_T IPC_APP_get_sd_record_mode(VOID);
#endif

#ifdef TUYA_DP_SD_UMOUNT
BOOL_T IPC_APP_unmount_sd_card(VOID);
#endif

#ifdef TUYA_DP_SD_FORMAT
VOID IPC_APP_format_sd_card(VOID);
#endif

#ifdef TUYA_DP_SD_FORMAT_STATUS_ONLY_GET
INT_T IPC_APP_get_sd_format_status(VOID);
#endif

#ifdef TUYA_DP_PTZ_CONTROL
VOID IPC_APP_ptz_start_move(CHAR_T *p_direction);
#endif

#ifdef TUYA_DP_PTZ_STOP
VOID IPC_APP_ptz_stop_move(VOID);
#endif

#ifdef TUYA_DP_PTZ_CHECK
void IPC_APP_ptz_check(VOID);
#endif

#ifdef TUYA_DP_SOUND_SENSITIVITY
VOID IPC_APP_set_sound_sensitivity(UINT_T val);
CHAR_T *IPC_APP_get_sound_sensitivity(VOID);
#endif

#ifdef TUYA_DP_IPC_CONTRAST
VOID IPC_APP_set_ipc_contrast(INT_T val);
INT_T IPC_APP_get_ipc_contrast(VOID);
#endif

#ifdef TUYA_DP_IPC_BRIGHT
VOID IPC_APP_set_ipc_bright(INT_T val);
INT_T IPC_APP_get_ipc_bright(VOID);
#endif

#ifdef TUYA_DP_SET_SPK_VOLUME
VOID IPC_APP_set_spk_volume(INT_T val);
INT_T IPC_APP_get_spk_volume(VOID);
#endif

#ifdef TUYA_DP_RECORDING_EXISTS
INT_T IPC_APP_get_recording_exists(VOID);
#endif

#ifdef TUYA_DP_AP_MODE
CHAR_T *IPC_APP_get_ap_mode(VOID);
#endif

#ifdef TUYA_DP_AP_SWITCH
VOID change_ap_process();
INT_T IPC_APP_set_ap_mode(IN cJSON *p_ap_info);
#endif

#ifdef TUYA_DP_RGB_LED_COLOUR
VOID IPC_APP_set_rgb_led_colour(INT_T val);
INT_T IPC_APP_get_rgb_led_colour(VOID);
#endif

VOID IPC_APP_set_bool_switch(TY_OBJ_DP_S *p_obj_dp);

#ifdef __cplusplus
}
#endif

#endif  /*_TUYA_IPC_DP_HANDLER_H*/
